package cn.tedu.fresheveryday.controller;

import cn.tedu.fresheveryday.pojo.vo.ProductCategoryVO;
import cn.tedu.fresheveryday.service.IProductCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "商品类别模块")
@RequestMapping(path = "/category", produces = "application/json;charset=utf-8")
public class ProductCategoryController {
    @Autowired
    private IProductCategoryService service;

    /**
     * 查询部商品分类
     *
     * @return
     */
    @ApiOperation("查询全部商品类别")
    @GetMapping("/selectAll")
    public List<ProductCategoryVO> selectAll() {
        return service.selectAll();
    }

}